//引入所需要的包
const express = require("express");
const bodyParser = require("body-parser");
const login = require("./routers/login.js");
const basic = require("./routers/basic.js");
const collect = require("./routers/collect.js");
const index_img = require("./routers/index_img.js");
const menu = require("./routers/menu.js");
const possible_like = require("./routers/possible_like.js");
const product_class = require("./routers/product_class.js");
const product = require("./routers/product.js");
const property_name = require("./routers/property_name.js");
const property_value = require("./routers/property_value.js");
const shopping = require("./routers/shopping.js");
const slide_img = require("./routers/slide_img.js");
const stay_message = require("./routers/stay_message.js");
const team_list = require("./routers/team_list.js");
const user_address = require("./routers/user_address.js");
const user = require("./routers/user.js");
const vip = require("./routers/vip.js");
//使用express构建web服务器
var app = express();
app.listen(3000);

//托管静态资源
app.use(express.static("./static"));
//配置body-parser
app.use(bodyParser.urlencoded({
  extended: false
}));

app.use("/login",login);
app.use("/basic", basic);
app.use("/collect", collect);
app.use("/index_img", index_img);
app.use("/menu", menu);
app.use("/possible_like", possible_like);
app.use("/product_class", product_class);
app.use("/product", product);
app.use("/property_name", property_name);
app.use("/property_value", property_value);
app.use("/shopping", shopping);
app.use("/slide_img", slide_img);
app.use("/stay_message", stay_message);
app.use("/team_list", team_list);
app.use("/user_address", user_address);
app.use("/user", user);
app.use("/vip", vip);
